home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Science / RasMol2 / rasmol.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  2.7 KB  |  154 lines  |  [TEXT/KAHL]

  1. /* rasmol.h
  2.  * RasMol2 Molecular Graphics
  3.  * Roger Sayle, October 1994
  4.  * Version 2.5
  5.  */
  6.  
  7.  
  8. /*****************************/
  9. /*  User Definable Options!  */
  10. /*****************************/
  11.  
  12. /* #define IBMPC        */
  13. #define APPLEMAC
  14. /* #define DIALBOX */
  15. /* #define TERMIOS */
  16. /* #define MITSHM */
  17.  
  18. /* Use Default Depth!   */
  19. /* #define THIRTYTWOBIT */
  20. /* #define EIGHTBIT     */
  21.  
  22.  
  23. /**************************/
  24. /*  Default User Options! */
  25. /**************************/
  26.  
  27. #ifdef IBMPC
  28. #undef THIRTYTWOBIT
  29. #endif
  30.  
  31. #if !defined(EIGHTBIT) && !defined(THIRTYTWOBIT)
  32. #define EIGHTBIT
  33. #endif
  34.  
  35. #ifndef RASMOLDIR
  36. #ifdef IBMPC
  37. #define RASMOLDIR  "C:\\RASWIN\\"
  38. #endif
  39.  
  40. #if !defined(IBMPC) && !defined(APPLEMAC) && !defined(VMS)
  41. #define RASMOLDIR "/usr/local/lib/rasmol/"
  42. #endif
  43. #endif
  44.  
  45. #if !defined(INVERT) && defined(IBMPC)
  46. #define INVERT
  47. #endif
  48.  
  49. #ifndef FUNCPROTO
  50. #if defined(__STDC__) || defined(IBMPC) || defined(APPLEMAC)
  51. #define FUNCPROTO
  52. #endif
  53. #endif
  54.  
  55. /********************************/
  56. /*  Application-wide Constants  */
  57. /********************************/
  58.  
  59. #ifndef True
  60. #define True  1
  61. #define False 0
  62. #endif
  63.  
  64. #ifndef PI   /* Avoid Linux Warnings! */
  65. #define PI   3.14159265358979323846
  66. #endif
  67.  
  68.  
  69. typedef double Real;
  70. #ifndef APPLEMAC
  71. typedef unsigned char Byte;
  72. #endif
  73.  
  74. #ifdef __STDC__
  75. typedef signed char Char;
  76. #else
  77. typedef char Char;
  78. #endif
  79.  
  80. #ifdef _LONGLONG
  81. typedef unsigned int Card;
  82. typedef int Long;
  83. #else
  84. typedef unsigned long Card;
  85. typedef long Long;
  86. #endif
  87.  
  88. #ifdef EIGHTBIT
  89. typedef Byte Pixel;
  90. #else
  91. typedef Long Pixel;
  92. #endif
  93.  
  94.  
  95.  
  96. #define Rad2Deg      (180.0/PI)
  97. #define Deg2Rad      (PI/180.0)
  98. #define AbsFun(a)    (((a)<0)? -(a) : (a))
  99. #define MinFun(a,b)  (((a)<(b))? (a) : (b) )
  100. #define MaxFun(a,b)  (((a)>(b))? (a) : (b) )
  101.  
  102. #if defined(__STDC__) || defined(IBMPC)  || defined(APPLEMAC) || defined(__sgi)
  103. #define ToUpper(x)   (toupper((x)))
  104. #else
  105. #define ToUpper(x)   (islower((x))?toupper((x)):(x))
  106. #endif
  107.  
  108.  
  109. #if !defined(IBMPC) || defined(_WIN32)
  110. #ifdef APPLEMAC
  111. #define _fmalloc   NewPtrSys
  112. #define _ffree(x)  DisposePtr((Ptr)(x))
  113. #else
  114. #define _fmalloc   malloc
  115. #define _ffree     free
  116. #endif
  117. #define _fstrcmp   strcmp
  118. #define _fmemset   memset
  119. #define __huge
  120. #define __far
  121. #endif
  122.  
  123.  
  124. #define ItemCount       8
  125. #define AdvPickAtom     0
  126. #define AdvPickNumber   1
  127. #define AdvSelectCount  2
  128. #define AdvName         3
  129. #define AdvIdent        4
  130. #define AdvClass        5
  131. #define AdvImage        6
  132. #define AdvPickCoord    7
  133.  
  134.  
  135. #ifndef RASMOL
  136. #ifdef FUNCPROTO
  137. void WriteChar( int );
  138. void WriteString( char* );
  139. void RasMolFatalExit( char* );
  140. void AdviseUpdate( int );
  141. void RefreshScreen();
  142. void RasMolExit();
  143.  
  144. #else /* non-ANSI C compiler */
  145. void WriteChar();
  146. void WriteString();
  147. void RasMolFatalExit();
  148. void RefreshScreen();
  149. void AdviseUpdate();
  150. void RasMolExit();
  151.  
  152. #endif
  153. #endif
  154.